<%@ Page Language="C#" MasterPageFile="~/master/public-regular.master" AutoEventWireup="true"
    CodeFile="order-summary.aspx.cs" Inherits="order_summary" %>

<%@ Register Namespace="ECommerce.Library.Web" TagPrefix="ucc" %>
<%@ Register Namespace="ECommerce.Library.ECommerce" TagPrefix="ucc" %>
<%@ Register Src="~/controls/wucValidator.ascx" TagName="Validator" TagPrefix="wuc" %>
<%@ Register src="controls/address.ascx" tagname="Address" tagprefix="eShopControl" %>
<%@ Register TagPrefix="widget" TagName="ShoppingCart" Src="~/widget/shopping-cart.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderNestedHeader"
    runat="Server">
    <script type="text/javascript">
        function NavigateToSSLCommerz(_amt, _tran, _succUrl, _failUrl, _cancelUrl) {
            $(".registration-form").addClass("overlay-wrapper");
            $("input[name=total_amount]").val(_amt);
            $("input[name=tran_id]").val(_tran);
            $("input[name=success_url]").val(_succUrl);
            $("input[name=fail_url]").val(_failUrl);
            $("input[name=cancel_url]").val(_cancelUrl);
            $("#<% =btnSSLCommerez.ClientID %>").click();
        }
    </script>
</asp:Content>
<asp:Content ID="cntContent" ContentPlaceHolderID="cphMiddleContent" runat="Server">
    <input type="hidden" name="store_id" value="pocketeshop" />
    <input type="hidden" name="total_amount" value="" />
    <input type="hidden" name="tran_id" value="" />
    <input type="hidden" name="success_url" value="" />
    <input type="hidden" name="fail_url" value="" />
    <input type="hidden" name="cancel_url" value="" />
    <div style="visibility: hidden; height: 0px;">
        <asp:Button runat="server" ID="btnSSLCommerez" Text="SSL" CssClass="button gray"
            CausesValidation="false" PostBackUrl="https://www.sslcommerz.com.bd/testbox/process/index.php" />
    </div>
    <div class="regular-pages inline registration-form">
        <ucc:ResponseMessage ID="uccResponseMessage" runat="server"></ucc:ResponseMessage>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
            DisplayMode="BulletList" ShowMessageBox="false" HeaderText="Please correct the following:"
            CssClass="adminValidator" ShowSummary="False" />
        <div class="shoping-steps">
            <div class="btn-regular btn-dim">
                Shopping Cart
            </div>
            <div class="btn-regular btn-dim">
                Login/Register
            </div>
             <div class="btn-regular">
                Checkout
            </div>
              <div class="btn-regular btn-dim">
                Confirm Order
            </div>
         
            <div class="btn-regular btn-dim">
                Receipt
            </div>
        </div>
        <br class="clear" />
        <asp:PlaceHolder runat="server" ID="phUserInformation" Visible="false">
        <fieldset>
            <legend>User Information</legend>
            <label>Full Name</label>
            <asp:TextBox runat="server" ID="tbFullName" CssClass="text"></asp:TextBox>
            <asp:RequiredFieldValidator runat="server" ID="rfvFullName" ControlToValidate="tbFullName"
                Display="None" SetFocusOnError="true" EnableClientScript="true" 
                ErrorMessage="Name is required" />
            <br />
            <label>Email Address</label>
            <asp:TextBox runat="server" ID="tbEmailAddress" CssClass="text"></asp:TextBox>
            <asp:RequiredFieldValidator runat="server" ID="rfvEmailAddress" ControlToValidate="tbEmailAddress"
                Display="None" SetFocusOnError="true" EnableClientScript="true" 
                ErrorMessage="Email Address is required" />
            <asp:RegularExpressionValidator runat="server" ID="revEmailAddress" ControlToValidate="tbEmailAddress"
                Display="None" SetFocusOnError="true" EnableClientScript="true" 
                ErrorMessage="Incorrect Email Format" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />
        </fieldset>
        </asp:PlaceHolder>
        <fieldset>
            <legend>Shipping Address</legend>
            <asp:PlaceHolder runat="server" ID="phAddressSelector">
                <label>Address Book</label>
                <asp:DropDownList ID="ddlAddressBookList" runat="server" Width="250px" OnSelectedIndexChanged="ddlAddressBookList_SelectedIndexChanged"
                    AutoPostBack="true">
                </asp:DropDownList>
            </asp:PlaceHolder>
            <br class="clear" />
            <eShopControl:Address ID="aShippingAddress" runat="server" />
        </fieldset>
        <fieldset>
            <legend>Order Item Details</legend>
            <widget:ShoppingCart ID="shoppingCart" runat="server" IsEditable="false" />
            <div class="grid-footer">
            <label>
                Shipping &amp; Handling: </label>
            <asp:Label ID="lblShippingCost" CssClass="user" runat="server"></asp:Label>
            <br />
            <label>
                Total: </label>
            <asp:Label ID="lblTotal" runat="server" CssClass="user"></asp:Label>
            </div>
        </fieldset>
        <fieldset>
            <legend>Payment Information </legend>
            <label>
                Payment Method
            </label>
            <asp:DropDownList ID="ddlPaymentMethod" runat="server" Width="225px">
                <asp:ListItem Text="Card" Value="CreditCard"></asp:ListItem>
                <asp:ListItem Text="bKash" Value="bKash"></asp:ListItem>
            </asp:DropDownList>
        </fieldset>
        <fieldset>
            <legend>Message/Comments</legend>
            <label>
                Comments OR Special Instructions
            </label>
            <asp:TextBox ID="tbxComment" runat="server" CssClass="text" TextMode="MultiLine"
                Style="height: 130px!important; width: 330px!important"></asp:TextBox>
        </fieldset>
        <div class="btn-place-holder">
            <asp:Button runat="server" ID="imbPlaceOrderOnline" Text="Place Order" CssClass="button gray"
                OnClick="PlaceOrderOnline_Click" />
        </div>
    </div>
</asp:Content>
